extends Control


var data = null

func _ready():
	pass 



func set_data(data):
	self.data = data
	rect_position = Vector2(data["x"]+50000, data["y"]+50000)
	
	$Label.text = "【%s】传送门：%s" % [data["id"], data["name"]]



func _on_gui_input(event):
	if event is InputEventMouseButton:  
		if event.button_index == BUTTON_RIGHT and event.pressed:
			var ui = MainTool.getUILayer().add_ui("res://tool/page/map/mapView/door/DoorRightMenu.tscn", 0, true)
			ui.set_data(data)

func _on_MapDoor_button_up():
	var ui = MainTool.getUILayer().add_ui("res://tool/page/map/mapView/modal/MapDoorModal.tscn")
	ui.set_edit_data(data)
